/**
 * Handle changed data.
 *
 * @param {Object} oldValue old value
 * @param {Object} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"539D5E36-D783-4C51-B7E2-BDA531B10090"}
 */
function onDataChangeNombre(oldValue, newValue, event) {
	nombre = nombre.toUpperCase()
	return true
}

/**
 * Handle changed data.
 *
 * @param {Object} oldValue old value
 * @param {Object} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"F301B085-ABF7-4721-B58E-DCE472CF0C87"}
 */
function onDataChangeDireccion(oldValue, newValue, event) {
	direccion = direccion.toUpperCase()
	return true
}

/**
 * Handle changed data.
 *
 * @param {Object} oldValue old value
 * @param {Object} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"73F87BF5-8BAD-4478-889F-BE5867C74808"}
 */
function onDataChangeMail(oldValue, newValue, event) {
	mail = mail.toLowerCase()
	return true
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"45AE3BA5-FFA5-4AA5-ADC6-EBE38BD1735C"}
 */
function onShow(firstShow, event) {
	// Avisa si es el cumpleaños
	var hoy = new Date()
	if (hoy == fecha_nacim)
		globals.gDialog('Aviso','Hoy es el cumpleaños del paciente','OK','CerrarForm')
}
